/*
 * @Author: gao_m3
 * @Date: 2020-09-03 08:52:51
 * @LastEditors: chen_yt
 * @LastEditTime: 2022-07-26 08:55:27
 * @Descripttion: 
 */
import request from '@/utils/request'

export function getSMSCaptcha(data) {
  return request({
    url: '/sys-auth/oauth/sms_captcha',
    params: data,
    method: 'get'
  })
}

export function getRegisterSMSCaptcha(data) {
  return request({
    url: '/sys-user/user/sms_register_captcha',
    params: data,
    method: 'get'
  })
}

export function userRegister(data) {
  return request({
    url: '/sys-user/user/register',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function getErrorParams(data) {
  return request({
    url: '/sys-auth/oauth/user/lock/num',
    params: data,
    method: 'get'
  })
}

export function getImgCaptcha() {
  return request({
    url: '/sys-auth/oauth/img_captcha',
    params: {
      height: 43,
      width: 110,
      len: 4
    },
    method: 'get'
  })
}

export function getSms(data) {
  return request({
    url: '/sys-user/user/sms_captcha',
    params: data,
    method: 'get'
  })
}

export function editPassword(data) {
  return request({
    url: '/sys-user/user/retrieve/pwd',
    data: data,
    method: 'put'
  })
}

export function reqGet(data) {
  return request({
    url: '/sys-auth/oauth/behaviour_captcha',
    method: 'post',
    data
  })
}

export function reqCheck(data) {
  return request({
    url: '/sys-auth/oauth/check_behaviour_captcha',
    method: 'post',
    data
  })
}
